﻿using MySql.Data.MySqlClient;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CloudDcPc
{
    public class DBConnection
    {

        private MySqlConnection myConn = null;
        private string conStr = "charset=utf8;user id=fengma;host=localhost;database=ordersystem;password=guduahut2013";
        // private string conStr = "charset=utf8;user id=root;host=localhost;database=ordersystem;password=";
        // private string conStr = "charset=utf8;user id=fengma;host=localhost;database=ordersystem;password=fengma";
        public DBConnection()
        {
            myConn = new MySqlConnection(conStr);
        }
        public MySqlConnection getConnection()
        {
            return myConn;
        }
        public void close()
        {
            if (this.myConn != null)
                myConn.Close();
        }
    }
}
